package com.zx.cloud.controller.client;

import java.util.List;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.zx.cloud.ApiVersion;
import com.zx.cloud.common.auth0.jwt.Token;
import com.zx.cloud.domain.Client;
import com.zx.cloud.domain.ClientAuth;
import com.zx.cloud.domain.CollegeDepartment;
import com.zx.cloud.domain.Dict;
import com.zx.cloud.domain.IdCardImg;
import com.zx.cloud.domain.Provinces;
import com.zx.cloud.domain.SmsMsg;
import com.zx.cloud.domain.VerifyMsg;
import com.zx.cloud.model.response.ObjectDataResponse;
import com.zx.cloud.model.response.Response;

/**
 * @author Alex
 */
@FeignClient(name = ProviderClient.SERVICE_ID, fallback = ProviderClientFallback.class)
public interface ProviderClient {
	
    /**
     * eureka service name
     */
    String SERVICE_ID = "trade-provider";
    
    
    @RequestMapping(value =ApiVersion.PROVIDER_V1_PREFIX+"/client/clientRegister", method = RequestMethod.POST)
    ObjectDataResponse<Token> clientRegister(Client client);
    
    @RequestMapping(value =ApiVersion.PROVIDER_V1_PREFIX+"/client/clientLogin", method = RequestMethod.POST)
    ObjectDataResponse<Token> clientLogin(Client client);
    
    @RequestMapping(value =ApiVersion.PROVIDER_V1_PREFIX+"/client/refreshToken", method = RequestMethod.POST)
    ObjectDataResponse<Token> refreshToken(Long userId);
    
    @RequestMapping(value =ApiVersion.PROVIDER_V1_PREFIX+"/client/forgotPassword", method = RequestMethod.POST)
    ObjectDataResponse<Integer> forgotPassword(Client client);
    
    @RequestMapping(value =ApiVersion.PROVIDER_V1_PREFIX+"/client/modifyPassword", method = RequestMethod.POST)
    ObjectDataResponse<Integer> modifyPassword(Client client);
    
    @RequestMapping(value =ApiVersion.PROVIDER_V1_PREFIX+"/client/getClientAuth", method = RequestMethod.POST)
    ObjectDataResponse<ClientAuth> getClientAuth(Client client);
    
    @RequestMapping(value =ApiVersion.PROVIDER_V1_PREFIX+"/client/sendSMS", method = RequestMethod.POST)
    ObjectDataResponse<Integer> sendSMS(SmsMsg smsMsg);
    
    @RequestMapping(value =ApiVersion.PROVIDER_V1_PREFIX+"/client/verifyCode", method = RequestMethod.POST)
    ObjectDataResponse<Integer> verifyCode(SmsMsg smsMsg);
    
    @RequestMapping(value =ApiVersion.PROVIDER_V1_PREFIX+"/client/getBanks", method = RequestMethod.POST)
    ObjectDataResponse<List<Dict>> getBanks();
    
    @RequestMapping(value =ApiVersion.PROVIDER_V1_PREFIX+"/client/collegeMsg", method = RequestMethod.POST)
    ObjectDataResponse<List<CollegeDepartment>> collegeMsg(Client client);
    
    @RequestMapping(value =ApiVersion.PROVIDER_V1_PREFIX+"/client/provinceMsg", method = RequestMethod.POST)
    ObjectDataResponse<List<Provinces>> provinceMsg(Client client);
    
    @RequestMapping(value =ApiVersion.PROVIDER_V1_PREFIX+"/client/handleClientIDCardMsg", method = RequestMethod.POST)
    ObjectDataResponse<Integer> handleClientIDCardMsg(VerifyMsg verifyMsg);
    
    @RequestMapping(value =ApiVersion.PROVIDER_V1_PREFIX+"/client/getOccpation", method = RequestMethod.POST)
    ObjectDataResponse<List<Dict>> getOccpation();
    
    @RequestMapping(value =ApiVersion.PROVIDER_V1_PREFIX+"/client/getEducation", method = RequestMethod.POST)
    ObjectDataResponse<List<Dict>> getEducation();
    
    @RequestMapping(value =ApiVersion.PROVIDER_V1_PREFIX+"/client/saveIDCardImg", method = RequestMethod.POST)
    ObjectDataResponse<Integer> saveIDCardImg(IdCardImg idCardImg);

}
